package com.itheima;

public class StringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        sb.append("Hello");
        sb.append("world");
        sb.append(100);
        System.out.println("sb:" + sb);
        sb.reverse();
        System.out.println("sb:" + sb);

        String str = sb.toString();
        System.out.println("str: " + str);
        StringBuilder sb1 = new StringBuilder(str);
        sb1.reverse();
        System.out.println("sb1: " + sb1);
    }
}
